package com.example.rabbitmq.controller.retry;

import com.example.rabbitmq.Constants;
import jakarta.annotation.Resource;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@RestController
//@RequestMapping("/producer")
//public class RetryProducerController {
//
//    @Autowired
//    private RabbitTemplate rabbitTemplate;
//    @RequestMapping("/retry")
//    public String retry() {
//        CorrelationData correlationData = new CorrelationData("3");
//        rabbitTemplate.convertAndSend(Constants.RETRY_EXCHANGE,"retry",
//                "retry test...",correlationData);
//        return "发送消息成功";
//    }
//}
